Fix log message written when xenstored corrupts its store.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 23 May 2006 15:17:28 +0000 (16:17 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 23 May 2006 15:17:28 +0000 (16:17 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xenstore/xenstored_core.c

index 5c08934cdb41aece8ca804ce30cf6b9b33ae44dc..ec31977cdd4407876f825122cc4cea4f1b56559f 100644 (file)
@@ -451,6 +451,11 @@ static struct node *read_node(struct connection *conn, const char *name)
 
 static bool write_node(struct connection *conn, const struct node *node)
 {
+       /*
+        * conn will be null when this is called from manual_node.
+        * tdb_context copes with this.
+        */
+
        TDB_DATA key, data;
        void *p;
 
@@ -478,7 +483,7 @@ static bool write_node(struct connection *conn, const struct node *node)
 
        /* TDB should set errno, but doesn't even set ecode AFAICT. */
        if (tdb_store(tdb_context(conn), key, data, TDB_REPLACE) != 0) {
-               corrupt(conn, "Write of %s = %s failed", key, data);
+               corrupt(conn, "Write of %s failed", key.dptr);
                goto error;
        }
        return true;